package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.StockInDao;
import com.neuedu.model.StockIn;
import com.neuedu.service.StockInService;

//配置一个spring的服务，把业务实现类交给spring进行管理，由spring完成依赖注入
@Service
public class StockInServiceImpl implements StockInService {
	//织入-依赖注入
	@Autowired
	private StockInDao StockInDao;
	
	
	public void setStockInDao(StockInDao stockInDao) {
		StockInDao = stockInDao;
	}

	@Override
	public int countStockIn() {
		// TODO Auto-generated method stub
		return StockInDao.countStockIn();
	}

	@Override
	public List<StockIn> findAll(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return StockInDao.findAll(map);
	}

	@Override
	public int addStockIn(StockIn c) {
		// TODO Auto-generated method stub
		return StockInDao.addStockIn(c);
	}

	@Override
	public int updateStockIn(StockIn c) {
		// TODO Auto-generated method stub
		return StockInDao.updateStockIn(c);
	}

	@Override
	public int deleteStockIn(int id) {
		// TODO Auto-generated method stub
		return StockInDao.deleteStockIn(id);
	}

}
